package com.taplinker.client.im.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class DatabaseHelper extends SQLiteOpenHelper {

	private final String DB_CONVERSATION_SQL = "CREATE TABLE conversation " +
			"(`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT," +
			"`conversationId` varchar(32) NOT NULL," +
			"`updateDate` time DEFAULT NULL," +
			"`lastMessage` text," +
			"`messageType` " +
			"varchar(32) DEFAULT NULL, " +
			"`csIsLastsayer` varchar(32) DEFAULT NULL," +
			"`appName` varchar(32) DEFAULT NULL," +
			"`unread` bigint(20) DEFAULT NULL," +
			"`csname` varchar(32) DEFAULT NULL," +
			"`csicon` varchar(255) DEFAULT NULL," +
			"`productId` varchar(32) DEFAULT NULL," +
			"`productName` varchar(255) DEFAULT NULL," +
			"`picture` varchar(255) DEFAULT NULL," +
			"`description` text)";

	public DatabaseHelper(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(DB_CONVERSATION_SQL);

	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
	}

}
